<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>

        var a = ['it', 'bai', 'zhan'];
        for(var i = 0;i< a.length;i++){
            console.log(a[i]);
        }

        for(var i in a){
            console.log(a[i]);
        }


    </script>
</body>
</html>